package cn.wolfcode.shop.domain;

import cn.wolfcode.shop.basedomain.BaseDomian;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class SkuProperty extends BaseDomian{

    private Long catalogId;

    private String name;

    private Byte type;

    private Integer sort;

    public String getJsonData(){
        Map<String,Object> map = new HashMap<>() ;
        map.put("id",getId()) ;
        map.put("name",name) ;
        map.put("sort",sort) ;
        return JSON.toJSONString(map) ;
    }

}